/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Business;

import Entity.Etbl_Cities;
import Model.DALtbl_Cities;
import java.util.ArrayList;

/**
 *
 * @author LeThuyLinh
 */
public class Btbl_Cities {
    private DALtbl_Cities _objDAL_City=null;
    public Btbl_Cities(){
        _objDAL_City=new DALtbl_Cities();
    }
    public boolean Addtbl_Cities(Etbl_Cities objEtbl_City){
        return _objDAL_City.Addtbl_City(objEtbl_City);
    }
    public boolean Updatetbl_Cities(Etbl_Cities objEtbl_City){
        return _objDAL_City.updatetbl_City(objEtbl_City);
    }
    public boolean Deletetbl_Cities(int cityID){
        if(cityID>0){
            return _objDAL_City.deletetbl_City(cityID);
        }
        else{
            return false;
        }
    }
    public Etbl_Cities GetOnetbl_City(int cityID){
        if(cityID>0)
            return _objDAL_City.getCity(cityID);
        else
            return null;
    }
    public ArrayList GetListCities(String orderBy, String ASCorDESC, String WhereClause, int PagingIndex, int PagingSize){
        return _objDAL_City.getListCity(orderBy, ASCorDESC, WhereClause, PagingIndex, PagingSize);
    }
}
